<template>
	<view class="page">
		<view class="dahezi" v-for="neirong in liebiao" @click="gotoxiangqing(neirong.id)">
			<view class="allcontent">
				<view class="wenzineirong">
					<textarea>{{neirong.desc}}</textarea>
					<view class="liulian">
						<text>9555次浏览</text>
						<text>2222人喜欢</text>
					</view>
				</view>
				<view class="tupianhezi ">
					<image :src="neirong.bigPicture" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			token:'',
			liebiao:[]
			}
		},
		onLoad(options) {
			this.token=uni.getStorageSync("Authorization")
			console.log(this.token)
			console.log(options)
			uni.setNavigationBarTitle({
				title: options.typeName
			});
			this.huoquliebiaoxinxi(options.id)
		},
		methods: {
			huoquliebiaoxinxi(id){
				uni.request({
					url:this.$serverUrl+"/api/encyclopedia/type?typeId="+id,
					header:{
						Authorization:this.token
					},
					success:(result)=> {
						console.log(result.data.data)
						this.liebiao=result.data.data
						
						console.log("leibiao",this.liebiao)
					},
					fail(error) {
						console.log(error)
					}
				})
			
				
			},
			gotoxiangqing(id){
				uni.navigateTo({
					url:"/pages/baikexiangqing/baikexiangqing?id="+id
				})
			}

		}
	}
</script>

<style>
	.page {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	.dahezi {
		width: 100%;
		height: 130px;


	}

	.allcontent {
		margin: 3% 3% 0 3%;
		border-bottom: 1px solid gray;
		width: 94%;
		height: 90%;
		display: flex;
	}

	.wenzineirong {
		display: flex;
		flex-direction: column;
		width: 60%;
		height: 80%;

	}

	.contenthezi {
		display: flex;

	}

	.wenzineirong textarea {
		height: 47%;
		width: 100%;
		overflow: hidden;
	}

	.liulian {
		display: flex;
		justify-content: space-between;
		margin-top: 8%;
		color: #999eba;
		width: 80%;
	}

	.tupianhezi {
		border-radius: 10px;

		margin-left: 20px;
		width: 40%;
		height: 80%;
		background-color: aquamarine;
	}

	.tupianhezi image {
		border-radius: 10px;
		width: 100%;
		height: 100%;
	}
</style>
